package com.emellend.api.list;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
/**
 * 使用 listview的setChoiceMode，模拟checkbox
 * @author Administrator
 *
 */
public class List10 extends ListActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_single_choice,GENRES));
		final ListView listView=getListView();
		listView.setItemsCanFocus(false);
		listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
		
	}
	
	 private static final String[] GENRES = new String[] {
	        "Action", "Adventure", "Animation", "Children", "Comedy", "Documentary", "Drama",
	        "Foreign", "History", "Independent", "Romance", "Sci-Fi", "Television", "Thriller"
	    };

	
	 
}
